import request from '@/utils/request'

export function list(parameter) {
  return request({
    url: '/DangerCheckTaskDetail/GetPageData',
    method: 'get',
    params: parameter
  })
}

export function FormulateAgainAssing(data) {
    return request({
      url: '/DangerCheckTaskDetail/FormulateAgainAssing',
      method: 'post',
      data
    })
  }
  
  export function saveCheckTaskTemplateDetails(data,saveOp,companyCode) {
    return request({
      url: `/OtherDangerCheckTaskDetailJG/SaveCheckTaskTemplateDetails?saveOp=${saveOp}&companyCode=${companyCode}`,
      method: 'post',
      data
    })
  }


  export function getDetailTemplateData(parameter) {
    return request({
      url: '/OtherDangerCheckTaskDetailJG/GetDetailTemplateData',
      method: 'get',
      params: parameter
    })
  }


  
export function confirmAssign(data) {
  return request({
    url: '/DangerCheckTaskDetail/ConfirmAssign',
    method: 'post',
    data
  })
}

export function backAssign(data) {
  return request({
    url: '/DangerCheckTaskDetail/BackAssign',
    method: 'post',
    data
  })
}


export function SnapShotAdd(data,Submit) {
  return request({
    url: '/DangerCheckTaskDetail/SnapShotAdd?Submit='+Submit,
    method: 'post',
    data
  })
}

export function initNewEntity(parameter) {
  return request({
    url: '/DangerCheckTaskDetail/InitNewEntity',
    method: 'get',
    params: parameter
  })
}


export function getDangerDetail(parameter) {
  return request({
    url: '/OtherDangerCheckTaskDetailJG/GetDetail',
    method: 'get',
    params: parameter
  })
}

export function handleDelete(parameter) {
  return request({
    url: '/DangerCheckTaskDetail/DeleteTaskDetail',
    method: 'get',
    params: parameter
  })
}

export function SaveHiddenDanger(data,Confirm) {
  return request({
    url: '/DangerCheckTaskDetail/SaveHiddenDanger?Confirm='+Confirm,
    method: 'post',
    data
  })
}


export function SaveDetail(data,Submit) {
  return request({
    url: '/DangerCheckTaskDetail/SaveDetail?Submit='+Submit,
    method: 'post',
    data
  })
}

export function handleAdd(parameter) {
  return request({
    url: '/DangerCheckTaskDetail/SubmitRecord',
    method: 'get',
    params: parameter
  })
}

export function SubmitRecords(data) {
  return request({
    url: '/DangerCheckTaskDetail/SubmitRecords',
    method: 'post',
    data
  })
}

export function getHiddenDangerPageData(parameter) {
  return request({
    url: '/DangerCheckTaskDetail/GetHiddenDangerPageData',
    method: 'get',
    params: parameter
  })
}


export function ConfirmVerify(data) {
  return request({
    url: '/DangerCheckTaskDetail/ConfirmVerify',
    method: 'post',
    data
  })
}

export function backVerify(data) {
  return request({
    url: '/DangerCheckTaskDetail/BackVerify',
    method: 'post',
    data
  })
}



export function confirmFormulate(data) {
  return request({
    url: '/DangerCheckTaskDetail/ConfirmFormulate',
    method: 'post',
    data
  })
}

export function backFormulate(data) {
  return request({
    url: '/DangerCheckTaskDetail/BackFormulate',
    method: 'post',
    data
  })
}

export function confirmCorrective(data) {
  return request({
    url: '/DangerCheckTaskDetail/ConfirmCorrective',
    method: 'post',
    data
  })
}


export function BackHiddenDanger(data) {
  return request({
    url: '/DangerCheckTaskDetail/BackHiddenDanger',
    method: 'post',
    data
  })
}

export function getCheckAreaDetailPageData(parameter) {
  return request({
      url: '/DangerCheckTaskDetail/GetCheckAreaDetailPageData',
      method: 'get',
      params: parameter
  })
}